find_package(Qt6 REQUIRED COMPONENTS Core Network QUIET)
# find_package(Qt6 REQUIRED COMPONENTS LinguistTools)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(PROJECT_SOURCES
    basetype.h
    log/logger.cpp
    log/logger.h
    service/downloader.cpp
    service/downloader.h
    service/protocol.h
    service/request.h
    service/requestqueue.cpp
    service/requestqueue.h
    service/requesttask.cpp
    service/requesttask.h
    service/service.cpp
    service/service.h
    service/serviceenvironment.h
    service/uploader.cpp
    service/uploader.h
    task/functiontask.h
    task/task.cpp
    task/task.h
    task/taskgroup.cpp
    task/taskgroup.h
    task/taskmanager.cpp
    task/taskmanager.h
    utils/checklatestversion.cpp
    utils/checklatestversion.h
    utils/copyfile.cpp
    utils/copyfile.h
    utils/copyfilestask.cpp
    utils/copyfilestask.h
    utils/packs.cpp
    utils/packs.h
    utils/RC4.cpp
    utils/RC4.h
    utils/stringutils.cpp
    utils/stringutils.h
    utils/utils.cpp
    utils/utils.h
)

add_library(Base STATIC ${PROJECT_SOURCES})

target_compile_definitions(Base PRIVATE
)

target_include_directories(Base PRIVATE
    ${PROJECT_SOURCE_DIR}/src/libs
)

target_link_libraries(Base PRIVATE
    Qt6::Core
    Qt6::Network
)

# qt6_add_translations(Base
#     TS_FILES base_en_US.ts base_zh_CN.ts
#     QM_FILES_OUTPUT_VARIABLE qm_files
#     # LUPDATE_OPTIONS -no-obsolete
# )
